package com.foreveredu.propms.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Description:<br/>
 * 领域模型：收费标准类<br/>
 * Date:<br/>
 * 2013/3/2
 * 
 * @author hushigang
 */

@Entity
@Table(name = "T_ChargeCriterion")
public class ChargeCriterion implements Serializable {

	private static final long serialVersionUID = 1L;
	private int id;
	private HouseType houseType;// 房产类型，住宅/商铺/库房
	private BuildingType buildingType;// 楼栋类型，多层/高层
	private HouseSource houseSource;// 房产来源，商品房/还建房/经济适用房
	private ParkLocation parkLocation;// 停车位置，地下停车场/地面停车位
	private double amount;// 金额
	private ChargeItem chargeItem;// 所属收费项目
	private int enabled;// 是否有效，1有效，0无效
	private String createDate;// 创建日期
	private int type;// 收费标准类型，0表示普通收费标准，1表示单独收费标准
	private House house;// 单独收费的房产
	private SubDistrict subDistrict;//每个小区，收费标准不同

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column
	public double getAmount() {
		return amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	@ManyToOne
	@JoinColumn(name = "chargeItem_id")
	public ChargeItem getChargeItem() {
		return chargeItem;
	}

	public void setChargeItem(ChargeItem chargeItem) {
		this.chargeItem = chargeItem;
	}

	@ManyToOne
	@JoinColumn(name = "houseType_id")
	public HouseType getHouseType() {
		return houseType;
	}

	public void setHouseType(HouseType houseType) {
		this.houseType = houseType;
	}

	@ManyToOne
	@JoinColumn(name = "buildingType_id")
	public BuildingType getBuildingType() {
		return buildingType;
	}

	public void setBuildingType(BuildingType buildingType) {
		this.buildingType = buildingType;
	}

	@ManyToOne
	@JoinColumn(name = "houseSource_id")
	public HouseSource getHouseSource() {
		return houseSource;
	}

	public void setHouseSource(HouseSource houseSource) {
		this.houseSource = houseSource;
	}

	@ManyToOne
	@JoinColumn(name = "parkLocation_id")
	public ParkLocation getParkLocation() {
		return parkLocation;
	}

	public void setParkLocation(ParkLocation parkLocation) {
		this.parkLocation = parkLocation;
	}

	@Column
	public int getEnabled() {
		return enabled;
	}

	public void setEnabled(int enabled) {
		this.enabled = enabled;
	}

	@Column
	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	@Column
	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	@ManyToOne
	@JoinColumn(name = "house_id")
	public House getHouse() {
		return house;
	}

	public void setHouse(House house) {
		this.house = house;
	}

	@ManyToOne
	@JoinColumn(name = "subDistrict_id")
	public SubDistrict getSubDistrict() {
		return subDistrict;
	}

	public void setSubDistrict(SubDistrict subDistrict) {
		this.subDistrict = subDistrict;
	}
}
